{extend name="base"/}
{block name="content"}

    <div class="wrapper">
      <div class="topic">
        <div class="container">
          <div class="row">
            <ol class="breadcrumb hidden-xs">
              <li><a href="{:url('tcms/index/index')}">首页</a></li>
              <li class="active"><a href="{:url('tcms/Posts/index')}">文章</a></li>
            </ol>
          </div>
        </div>
      </div>

      <div class="container">
        <div class="row">     
          <div class="col-sm-9">
            {volist name="list" id="vo"}
            <div class="blog">
              {empty name="vo.thumb"}
              <img src="__THEMES__/img/default_post.jpg" alt="{$vo.title}">
              {else/}
              <img src="{$vo.thumb}" alt="{$vo.title}">
              {/empty}
              <div class="blog-desc">
                <h3><a href="{:url('tcms/Posts/detail',['id'=>$vo.id])}">{$vo.title}</a></h3>
                <hr>
                <p class="text-muted">文章来源：{$vo.source}&nbsp;&nbsp;&nbsp;&nbsp;发布时间：{$vo.updatetime|date="Y-m-d H:i:s",###}</p>
                <p>{$vo.abstract}</p>
                <a class="btn-animate btn-style btn-d btn-primary" href="{:url('tcms/Posts/detail',['id'=>$vo.id])}">查看详情...</a>               
              </div>
            </div>
            {/volist}
            
            <ul class="pagination pull-right">
              {$list->render()}
            </ul>
            <div class="clearfix"></div>
          </div>
      <div class="col-sm-3">
            
            <form role="form">              
                <div class="row">
                  <div class="col-sm-12">
                    <div class="input-group">
                      <input type="text" class="form-control" placeholder="Search">
                      <span class="input-group-btn">            
                        <button class="btn btn-style btn-k btn-primary" type="button"><i class="fa fa-search"></i></button>
                      </span>
                    </div>
                  </div>
                </div>
            </form><br><br>
            <div class="panel-heading">
              <strong>分类展示({:Core::loadAction("Posts/countPost",["id"=>1])})</strong>
            </div>
            <div class="panel">
              <div class="panel-body">
                <ul>
                  {volist name="listChild" id="vo"}
                  <li><a href="{:url('tcms/Posts/index',['cid'=>$vo.id])}">{$vo.title} ({$vo.num})</a></li>
                  {/volist}
                </ul>
              </div>
            </div>
          <div class="panel-heading"><strong>热门话题</strong></div>           
            <div class="panel-group" id="help-nav">
              {volist name=':Core::loadAction("Posts/getPosts",["data"=>["where"=>["channel"=>1,"isdelete"=>0,"ischeck"=>1],"limit"=>5,"order"=>"view desc","field"=>"id,title,abstract"]])' id="vo"}
              <div class="panel">
                <div class="panel-heading blue">
                  <a data-toggle="collapse" data-parent="#help-nav" href="#posts-{$vo.id}">
                    {$vo.title}
                  </a>
                </div>
                <div id="posts-{$vo.id}" class="panel-collapse collapse {eq name='key' value='0'}in{/eq}">
                  <div class="panel-body posts-hot">
                    <p>{$vo.abstract}</p>
                    <a href="{:url('tcms/Posts/detail',['id'=>$vo.id])}">查看详情</a>
                  </div>
                </div>
              </div>
              {/volist}
            </div>
          </div>
        </div>
      </div>
    </div>
{/block}